﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _7代理模式0
{
    interface IGiveGift
    {
        void GiveDolls();
        void GiveFlowers();
        void GiveChocolate();
    }

    class Pursuit:IGiveGift
    {
        private SchoolGirl mm;

        public Pursuit(SchoolGirl mm)
        {
            this.mm = mm;
        }

        public void GiveDolls()
        {
            MessageBox.Show("1");
        }

        public void GiveFlowers()
        {
            MessageBox.Show("2");
        }
        public void GiveChocolate()
        {
            MessageBox.Show("3");
        }
    }

    class Proxy:IGiveGift
    {
        private Pursuit gg;

        public Proxy(SchoolGirl mm)
        {
            gg=new Pursuit(mm);
        }

        public void GiveDolls()
        {
            gg.GiveDolls();
        }
        public void GiveFlowers()
        {
            gg.GiveFlowers();
        }
        public void GiveChocolate()
        {
            gg.GiveChocolate();
        }
    }

    class SchoolGirl
    {
        private string name;

        public string Name { get { return name; }
            set { name = value; }
        }
    }
}
